<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                      


<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

<ui:composition template="template.xhtml">
<link href="../css/styles.css" rel="stylesheet" type="text/css" />

	<ui:define name="title">
		<f:view>
			<title>Resultat recherche</title>
		</f:view>
	</ui:define>
	
	<ui:define name="body">
	
		<f:view>
		<h:form id="selectVoyageForm">
		 <rich:dataTable 
                    onRowMouseOver="this.style.backgroundColor='#F6CECE'"
                    onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
                    cellpadding="0" cellspacing="0" 
                    width="700" border="0" value="#{manager.voyages_recherche}" var="voyage_recherche"  >
                    
                    <f:facet name="header">
                        <rich:columnGroup>
                            <rich:column colspan="10">
                                <h:outputText value="Résultats recherche" />
                            </rich:column>
                            <rich:column breakBefore="true">
                                &nbsp;
                            </rich:column>
                            <rich:column>
                                <h:outputText value="Du" />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="Au" />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="Départ" />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="Destination" />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="Sport" />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="Hébergement" />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="Transport" />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="Nb pers." />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="prix €" />
                            </rich:column>
                        </rich:columnGroup>

                    </f:facet>
						<rich:column>
						 	  <h:selectBooleanCheckbox 
						 	  value="#{manager.checked[voyage_recherche.id_voyage]}" > 
						 	  </h:selectBooleanCheckbox>
						 </rich:column>
                        <rich:column>
                            <h:outputText value="#{voyage_recherche.date_depart}" >
                            	<f:convertDateTime type="date" pattern="dd/MM/yyyy"/>                     	
                            </h:outputText>
                        </rich:column>
                        <rich:column>
                            <h:outputText value="#{voyage_recherche.date_retour}">
                            	<f:convertDateTime type="date" pattern="dd/MM/yyyy"/>                     	
                            </h:outputText>
                        </rich:column>
                        <rich:column>
                            <h:outputText value="#{voyage_recherche.ville_depart}"></h:outputText>
                        </rich:column>
                        <rich:column>
                            <h:outputText value="#{voyage_recherche.destination}"></h:outputText>
                        </rich:column>
                         <rich:column>
                            <h:outputText value="#{voyage_recherche.sport.nom}"></h:outputText>
                        </rich:column>
                         <rich:column>
                            <h:outputText value="#{voyage_recherche.hebergement}"></h:outputText>
                        </rich:column>
                    	 <rich:column>
                            <h:outputText value="#{voyage_recherche.transport}"></h:outputText>
                        </rich:column>
                         <rich:column>
                            <h:outputText value="#{voyage_recherche.nb_personnes}"></h:outputText>
                        </rich:column>
                         <rich:column>
                            <h:outputText value="#{voyage_recherche.prix}">
                            	<f:convertNumber  pattern="######.## €"  />
                            </h:outputText>
                        </rich:column>
        </rich:dataTable>		
        <br></br>
		<h:commandButton value="Ajouter au panier" action="#{manager.enregistrerVoyage}" />
		</h:form>
		</f:view>
	</ui:define>

</ui:composition>
</html>
	